package com.pug.feign;

import com.pug.handler.FeignLoggerConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(value = "xq-order-service",
        fallback = OrderServiceFeignFallback.class,
        configuration = FeignLoggerConfiguration.class)
public interface OrderServiceFeign {

    @PostMapping("/create/{userId}/{productId}/{count}")
    boolean createOrder(@PathVariable("userId") Long userId,
                        @PathVariable("productId") Long productId,
                        @PathVariable("count") Integer count);
}
